﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MengLin.OOP.DesignPattern.Interface.ThreeCountry;
using MengLin.OOP.DesignPattern.ThreeCountry.AbstractFactory;

namespace MengLin.OOP.DesignPattern.AbstractFactory
{
    class Program
    {
        static void Main(string[] args)
        {
            #region 魏国
            {
                MengLin.OOP.DesignPattern.ThreeCountry.AbstractFactory.AbstractFactory factory = new WeilGuoFactory();
                IZhuGong zhugong = factory.CreateZhuGong();
                IWuJiang wujiang = factory.CreateWuJiang();
                zhugong.ShowZhuGong();
                wujiang.ShowWuJiang();
            }
            #endregion

            #region 蜀国
            {
                MengLin.OOP.DesignPattern.ThreeCountry.AbstractFactory.AbstractFactory factory = new ShuGuoFactory();
                IZhuGong zhugong = factory.CreateZhuGong();
                IWuJiang wujiang = factory.CreateWuJiang();
                zhugong.ShowZhuGong();
                wujiang.ShowWuJiang();
            }
            #endregion

            Console.ReadKey();
        }
    }
}
